/**
 * 
 */
package ${basepackage}.manager.op;

import java.util.List;

import ${basepackage}.manager.exception.ServiceException;
import ${basepackage}.model.criteria.op.AuthorityCriteria;
import ${basepackage}.model.po.op.Authority;
import ${basepackage}.model.vo.op.authority.AddAuthorityForm;
import ${basepackage}.model.vo.op.authority.AuthorityRow;
import ${basepackage}.model.vo.op.authority.UpdateAuthorityForm;
import ${basepackage}.model.vo.common.Page;

/**
 * @author "Jiance Qin"
 * 
 * @date 2014年2月24日
 * 
 * @time 下午5:31:34
 * 
 */
public interface AuthorityManager {
	/**
	 * 根据ID删除.
	 * 
	 * @param id
	 * @return
	 * @throws ServiceException
	 */
	public boolean delete(Long id) throws ServiceException;

	/**
	 * 根据查询条件分页获取权限列表.
	 * 
	 * @param criteria
	 * @param offset
	 * @param limit
	 * @return
	 * @throws ServiceException
	 */
	public Page<AuthorityRow> getAuthoritys(AuthorityCriteria criteria,
			int offset, int limit) throws ServiceException;

	/**
	 * 获取所有权限列表.
	 * 
	 * @return
	 * @throws ServiceException
	 */
	public List<Authority> getAll() throws ServiceException;

	/**
	 * 添加新权限.
	 * 
	 * @param addAuthorityForm
	 * @return
	 * @throws ServiceException
	 */
	public AuthorityRow addAuthority(AddAuthorityForm addAuthorityForm)
			throws ServiceException;

	/**
	 * 更新权限.
	 * 
	 * @param updateAuthorityForm
	 * @return
	 * @throws ServiceException
	 */
	public AuthorityRow updateAuthority(UpdateAuthorityForm updateAuthorityForm)
			throws ServiceException;
}
